from django.http import JsonResponse
# import json


def CommonResponse(code=100, msg='无返回内容', **kwargs):
    data = {
        'code': code,
        'msg': msg,
    }
    if kwargs:
        data.update(kwargs)
    # data = json.dumps(data, ensure_ascii=False)
    # print(data)
    return JsonResponse(data, safe=False)
